package me.zhengjie.modules.biz.domain.enums;

import lombok.Data;
import lombok.Getter;

@Getter
public enum ErrorCode {
    INVALID_INPUT(400, "Invalid input"),
    UNAUTHORIZED(401, "Unauthorized"),
    NOT_FOUND(404, "Not found"),
    INTERNAL_SERVER_ERROR(500, "Internal server error"),

    /** 院校/专业  1000~1499 */
    NOT_REPETITION_VOLUNTEER(1000,"已填报过该院校的志愿"),
    VOLUNTEER_NUM_ERROR(1001, "填报志愿中专业数量有误"),
    NUM_ALREADY_MAX(1002, "志愿已达上限，无法继续填报"),
    GET_PHONE_FAIL(1003, "获取手机号失败"),
    RECOMMEND_NMU_MAX(1004,"推荐次数已用尽"),
    SCORE_LOW_BASE_LINE(1005,"您的分数低于省控线分数，无法评估"),
    NOT_SET_CHANNEL(1006,"暂未开通该渠道，敬请期待"),
    VIP_TYPE_ERROR(1007,"VIP类型暂未开放"),
    TZ_GROSS_SCORE_ERROR(1009,"总分不能低于0或超过750"),
    ZSB_GROSS_SCORE_ERROR(1008,"总分不能低于0或超过450"),
    DZ_GROSS_SCORE_ERROR(1009,"总分不能低于0或超过500"),
    ALREADY_IS_VIP(1010,"已开通vip"),
    UNIVERSITY_LABEL_ERROR(1011,"院校类别有误"),
    NOT_MATCH_SCORE_SORT(1012,"没有匹配的分数段，请重新输入"),
    VIP_CATEGORY_IS_NULL(1013,"请选择vip的类型"),
    VOLUNTEER_SORT_ALREADY_EXIST(1014,"志愿序号已存在，请选择其他志愿"),
    SCORE_UNDER_CONTROLLER_LINE(1015,"暂未获取到专科院校的全量数据，避免影响测试结果，可移至专科指导目录进行评估"),

    /** 物流 1500~1999*/
    NOT_LOGISTICS_ORDER(1500,"暂未查询到物流订单，请稍后重试"),

    /** 其他异常 2000~2999 */
    BODY_NOTNULL(2000,"请将参数补充完整后重试！"),
    USER_INFO_ERROR(2001,"用户信息异常，请联系客服"),
    USER_NOT_REGISTER(2002, "用户未注册"),
    USER_ID_NOT_NULL(2003, "用户未登陆"),
    PARAM_INVALID(2004, "参数无效"),
    QUERY_FAILED(2005, "查询失败"),
    UPLOAD_FAILED(2006, "上传失败"),
    FILE_NOT_NULL(2007, "文件不能为空"),
    FILE_DELETE_FAILED(2008,"文件删除失败"),
    IMG_CODE_NOT_NULL(2009,"推荐码不能为空"),
    EXPORT_FAILED(2010,"没有可导出的数据"),
    CODE_ALREADY_EXIST(2011,"编码已存在!"),

    /** 商城、订单的异常  3000~3999*/
    PRODUCT_ALREADY_EXIST(3000,"商品已存在，请勿重复添加！"),
    PRODUCT_KIND_ALREADY_EXIST(3001,"商品该种类已经存在，请勿重复添加！"),
    PRODUCT_ADJUSTING(3002,"商品正在调整，请稍后查询"),
    PRODUCT_ALREADY_SOLD(3003,"该商品暂无库存"),
    TREE_LEVEL_EXCEED_MIX_SIZE(3004,"商品分类不能超过两层"),
    MODULE_ID_NOT_NULL(3005,"商品大类id不能为空"),
    ORDER_EXPIRE(3006,"订单已过期，请重新下单"),
    PRICE_OR_NUM_IS_NULL(3007,"商品价格或数量为空，无法计算总金额"),
    ORDER_IS_NOT_EXIST(3008,"订单不存在"),
    ORDERSN_NOT_NULL(3009,"订单号不能为空"),
    ORDER_ALREADY_SOLD(3010,"订单已售后"),
    VIP_ORDER_NOT_SUPPORT(3011,"vip订单不支持售后"),
    VIP_ORDER_NOT_REFUND(3012,"vip订单不支持退款"),
    REFUND_FAILED(3014,"退款失败"),
    NOT_SUFFICIENT_FUNDS(3015,"商家余额不足，请联系客服"),
    PRODUCT_NOT_EXIST(3016,"商品不存在"),
    UPDATE_CART_FAILED(3017,"修改购物车失败"),
    UPDATE_IDS_NOT_NULL(3018,"购物车ids不能为空"),
    REFUND_MONEY_ERROR(3019,"退款金额不能大于总金额"),
    MERCHANT_UNDELIVERED(3020,"商品暂未发货"),
    ORDER_ALREADY_PAY(3021,"订单已付款，如需退款请申请售后"),
    ;

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

}